package com.terrier.ui.events
{
    import flash.events.Event;

    /**
     * 按钮事件
     * @author Jarvis.weng
     */
    public class WxButtonEvent extends Event
    {
        public static const BUTTON_PRESS:String = "buttonPress";

        public static const BUTTON_RELEASE:String = "buttonRelease";

        public static const BUTTON_CLICK:String = "buttonClick";

        public static const BUTTON_DOUBLE_CLICK:String = "buttonDoubleClick";

        public static const BUTTON_PHASE_CHANGE:String = "buttonPhaseChange";

		private var _currentPhase:String;
		
		private var _oldPhase:String;

        public function WxButtonEvent(type:String, oldPhase:String = null, currentPhase:String = null, bubbles:Boolean = false, cancelable:Boolean = false)
        {
            super(type, bubbles, cancelable);
			_currentPhase = currentPhase;
			_oldPhase = oldPhase;
        }
		
		public function get currentPhase():String
		{
			return _currentPhase;
		}
		
		public function get oldPhase():String
		{
			return _oldPhase;
		}

        override public function clone():Event
        {
            return new WxButtonEvent(type, _oldPhase, _currentPhase, bubbles, cancelable);
        }
    }
}
